﻿using System;
using System.Reflection;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Web;


namespace cz.uhul.DSMLv2.Server.Sql
{
  public partial class LdDatabase
  {

    /// <summary>
    /// .NET contains bug, sproc sometimes returns Guid and sometimes SqlGuid
    /// irregulary. This function resolves Guid
    /// </summary>
    /// <param name="dbParamVal"></param>
    /// <returns></returns>
    private static Guid _getGuid(object dbParamVal)
    {
      if (dbParamVal is SqlGuid)
        return ((SqlGuid)dbParamVal).Value;

      else if (dbParamVal is Guid)
        return (Guid)dbParamVal;

      else
        throw new InvalidOperationException("cant convert input dbParamVal to Guid");
    }




  }
}